#include <string>
#include <iostream>
#include <cstdlib>

using std::string;

string whatTime(int tm){
	assert(tm>-1 && tm<86400);
	int h=tm/3600;
	int hm=tm%3600;
	int m=hm/60;
	int s=tm%60;
	
	char* str=(char*)malloc(10);
	sprintf(str,"%d:%d:%d",h,m,s);
	return string(str);
}

int main(){
	assert(whatTime(0)=="0:0:0");
	assert(whatTime(3661)=="1:1:1");
	assert(whatTime(5436)=="1:30:36");
	assert(whatTime(86399)=="23:59:59");	
}